package com.jade.store.operation.entity;
import com.jade.bss.db.IdEntity;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 满减送
 */
@Entity
@Table(name = "STORE_OP_MJS")
public class MJS extends IdEntity {
    public static  int STATUS_NEW=0;//未使用
    public static  int STATUS_USED=1;//已经使用
    public static  int STATUS_EXPIRED=9;//已过期

    public static  int ALL_GODDS=0;//未使用
    public static  int PART_GOODS=1;//已经使用

    public static  int POST_FEE_FREE_NO=0;//不免邮费
    public static  int POST_FEE_FREE_YEW=1;//免邮费
    /***
     * 促销名称
     */
    @Column(name = "name", nullable = false, updatable = true)
    private String name;
    /***
     * 面值
     */
    @Column(name = "mjs_amount", precision = 12, scale = 2)
    private BigDecimal mjsAmount=new BigDecimal(0);
    /***
     * 消费金额
     */
    @Column(name = "amount", precision = 12, scale = 2)
    private BigDecimal amount=new BigDecimal(0);
    /***
     * 减多少
     */
    @Column(name = "j_amount", precision = 12, scale = 2)
    private BigDecimal jAmount=new BigDecimal(0);

    /***
     * 是否包邮  默认：0 不包邮  1：包邮
     */
    @Column(name = "isFreeShipping", nullable = false, updatable = true)
    private int isFreeShipping=0;

    @Temporal(TemporalType.DATE)
    @Column(name = "begin_time", precision = 12, scale = 2)
    private Date beginTime;

    @Temporal(TemporalType.DATE)
    @Column(name = "end_time", precision = 12, scale = 2)
    private Date endTime;
    /***
     * 名称
     */
    @Column(name = "store_id", nullable = false, updatable = true)
    private long storeId;
    /***
     * 免邮费 0：不免邮费  1：免邮费
     */
    @Column(name = "freePost", nullable = false, updatable = true)
    private int freePost=POST_FEE_FREE_NO;
    /***
     * 积分
     */
    @Column(name = "integralNum", nullable = false, updatable = true)
    private int integralNum;
    /***
     * 全部商品   0：全部商品  1：部分商品
     */
    @Column(name = "allGoods", nullable = false, updatable = true)
    private int allGoods=ALL_GODDS;
    /***
     * 使用商品编号
     */
    @Column(name = "goods_id", nullable = true, updatable = true)
    private String goodsIds;
    /***
     * 备注
     */
    @Column(name = "remark", nullable = true, updatable = true)
    private String remark;
    @Column(columnDefinition = "int default 0",name = "status", nullable = true, updatable = true)
    private int status=STATUS_NEW;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public int getIsFreeShipping() {
        return isFreeShipping;
    }

    public void setIsFreeShipping(int isFreeShipping) {
        this.isFreeShipping = isFreeShipping;
    }

    public Date getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(Date beginTime) {
        this.beginTime = beginTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public long getStoreId() {
        return storeId;
    }

    public void setStoreId(long storeId) {
        this.storeId = storeId;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public BigDecimal getMjsAmount() {
        return mjsAmount;
    }

    public void setMjsAmount(BigDecimal mjsAmount) {
        this.mjsAmount = mjsAmount;
    }

    public BigDecimal getjAmount() {
        return jAmount;
    }

    public void setjAmount(BigDecimal jAmount) {
        this.jAmount = jAmount;
    }

    public int getIntegralNum() {
        return integralNum;
    }

    public void setIntegralNum(int integralNum) {
        this.integralNum = integralNum;
    }

    public int getAllGoods() {
        return allGoods;
    }

    public void setAllGoods(int allGoods) {
        this.allGoods = allGoods;
    }

    public String getGoodsIds() {
        return goodsIds;
    }

    public void setGoodsIds(String goodsIds) {
        this.goodsIds = goodsIds;
    }

    public int getFreePost() {
        return freePost;
    }

    public void setFreePost(int freePost) {
        this.freePost = freePost;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}



 
 